package com.yxx.websocket;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * websocket 配置
 * @author yuxiangxun
 * @date 2025/2/14
 * @apiNote
 */
@Configuration
public class WebSocketConfig {

    /**
     * 自动注册使用@ServerEndpoint注解声明的WebSocket端点
     * @return
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
}
